package com.working.libcommon.util

import android.animation.TypeEvaluator
import android.graphics.PointF
import com.google.android.material.math.MathUtils

object PointFEvaluator : TypeEvaluator<PointF> {
    private val value: PointF = PointF()
    override fun evaluate(fraction: Float, startValue: PointF, endValue: PointF): PointF {
        return value.apply {
            x = MathUtils.lerp(startValue.x, endValue.x, fraction)
            y = MathUtils.lerp(startValue.y, endValue.y, fraction)
        }
    }

}